package com.ibeeking.found.common.db.config.prop;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @ClassName ShardingDataSourceProp
 * @Description 数据源
 * @Author ibeeking
 * @Date 2020-12-17 10:39
 **/

@ConfigurationProperties(prefix = "spring.datasource.dynamic")
@Configuration
@EnableAsync
@Component
@Data
public class MasterSlaveDataSourceProp {

    /**
     * 默认的数据源或数据源组
     */
    private String primary;

    private Map<String, Map<String, String>> datasource;
}
